const platformLayout = () => import('@/layout/platforms/wechat/index.vue')

const wechatRoutes = [
  // 平台使用
  {
    path: '/wechat',
    component: platformLayout,
    name: '',
    meta: { title: '微信公众号', roles: ['customer'] },
    children: [
      {
        path: '/wechat',
        name: 'wechatIndex',
        component: () => import('@/views/platform/wechat/index.vue'),
        meta: { title: '控制台' }
      },
      // {
      //   path: 'manage/:plaid',
      //   name: 'wechat_manage',
      //   component: () => import('@/views/platform/wechat/wechatManage/index.vue'),
      //   meta: { title: '微信公众平台配置' }
      // },
      {
        path: 'addon',
        name: 'wechat_addon',
        component: () => import('@/views/platform/wechat/addon.vue'),
        meta: { title: '应用管理' }
      },
      {
        path: 'user',
        name: 'wechat_user',
        component: () => import('@/views/platform/wechat/user.vue'),
        meta: { title: '用户管理' }
      },
      {
        path: 'pay',
        name: 'wechat_pay',
        component: () => import('@/views/platform/wechat/pay.vue'),
        meta: { title: '支付管理' }
      },
      {
        path: 'page',
        name: 'wechat_page',
        component: () => import('@/views/platform/wechat/pages.vue'),
        meta: { title: '页面设置' }
      },
      {
        path: 'setting',
        name: 'wechat_setting',
        component: () => import('@/views/platform/wechat/setting.vue'),
        meta: { title: '系统设置' }
      }
    ]
  }
]

export default wechatRoutes
